package com.zuqiuzhandui.liveing.model.resultModel;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by yq on 2016-10-14.
 */

public class LiveCreateRs implements Parcelable {


    /**
     * code : string
     * memberQty : 0
     * publishUrl : string
     * share : {"content":"string","logo":"string","title":"string","url":"string"}
     * teamCode : string
     * teamLogo : string
     * teamName : string
     */

    private String code;
    private int memberQty;
    private String publishUrl;
    /**
     * content : string
     * logo : string
     * title : string
     * url : string
     */

    private ShareBean share;
    private String teamCode;
    private String teamLogo;
    private String teamName;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public int getMemberQty() {
        return memberQty;
    }

    public void setMemberQty(int memberQty) {
        this.memberQty = memberQty;
    }

    public String getPublishUrl() {
        return publishUrl;
    }

    public void setPublishUrl(String publishUrl) {
        this.publishUrl = publishUrl;
    }

    public ShareBean getShare() {
        return share;
    }

    public void setShare(ShareBean share) {
        this.share = share;
    }

    public String getTeamCode() {
        return teamCode;
    }

    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }

    public String getTeamLogo() {
        return teamLogo;
    }

    public void setTeamLogo(String teamLogo) {
        this.teamLogo = teamLogo;
    }

    public String getTeamName() {
        return teamName;
    }

    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public static class ShareBean implements Parcelable {
        private String content;
        private String logo;
        private String title;
        private String url;

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.content);
            dest.writeString(this.logo);
            dest.writeString(this.title);
            dest.writeString(this.url);
        }

        public ShareBean() {
        }

        protected ShareBean(Parcel in) {
            this.content = in.readString();
            this.logo = in.readString();
            this.title = in.readString();
            this.url = in.readString();
        }

        public static final Creator<ShareBean> CREATOR = new Creator<ShareBean>() {
            @Override
            public ShareBean createFromParcel(Parcel source) {
                return new ShareBean(source);
            }

            @Override
            public ShareBean[] newArray(int size) {
                return new ShareBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeInt(this.memberQty);
        dest.writeString(this.publishUrl);
        dest.writeParcelable(this.share, flags);
        dest.writeString(this.teamCode);
        dest.writeString(this.teamLogo);
        dest.writeString(this.teamName);
    }

    public LiveCreateRs() {
    }

    protected LiveCreateRs(Parcel in) {
        this.code = in.readString();
        this.memberQty = in.readInt();
        this.publishUrl = in.readString();
        this.share = in.readParcelable(ShareBean.class.getClassLoader());
        this.teamCode = in.readString();
        this.teamLogo = in.readString();
        this.teamName = in.readString();
    }

    public static final Parcelable.Creator<LiveCreateRs> CREATOR = new Parcelable.Creator<LiveCreateRs>() {
        @Override
        public LiveCreateRs createFromParcel(Parcel source) {
            return new LiveCreateRs(source);
        }

        @Override
        public LiveCreateRs[] newArray(int size) {
            return new LiveCreateRs[size];
        }
    };
}
